﻿using SQLite;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GymTimer.Models
{
    public class Exercise
    {
        [PrimaryKey, AutoIncrement]
        public int ID { get; set; }

        [Required]
        public string Name { get; set; } = "";

        public int Round {  get; set; }
        public int RestTime { get; set; }
        public int ExerciseTime { get; set; }

        public int LastRestTime { get; set; }

        public int ScheduleID { get; set; }



        public int TotalTime()
        {
            return Round * (RestTime + ExerciseTime) + LastRestTime - RestTime;
        }

    }
}
